Consider a DFA over ∑ = {a, b} accepting all strings which have ...
We construct a DFA for strings divisible by 6. It requires minimum 6 states as length of string mod 6 = 0, 1, 2, 3, 4, 5
We construct a DFA for strings divisible by 8. It requires minimum 8 states as length of string mod 8 = 0, 1, 2, 3, 4, 5, 6, 7
If first DFA is minimum and second DFA is also minimum then after merging both DFAs resultant DFA will also be minimum. Such DFA is called as compound automata.
So, minimum states in the resultant DFA = 6 * 8 = 48
Thus, option (D) is the answer.
Please comment below if you find anything wrong in the above post.
View all questions of this test
Consider a DFA over ∑ = {a, b} accepting all strings which have ...
Solution:
The given DFA accepts all the strings that have a number of as divisible by 6 and the number of bs divisible by 8. Let us construct a DFA for the given language.
1. Divisibility by 6:
A DFA for divisibility by 6 can be constructed using 6 states, numbered 0 to 5, where the state i represents that the number of as in the input string is i modulo 6. The transitions from state i to state i+1 are labeled with 'a', and transitions from state i to state 0 are labeled with 'b'.
2. Divisibility by 8:
A DFA for divisibility by 8 can be constructed using 8 states, numbered 0 to 7, where the state i represents that the number of bs in the input string is i modulo 8. The transitions from state i to state i+1 are labeled with 'b', and transitions from state i to state 0 are labeled with 'a'.
3. Combining the DFAs:
The combined DFA will have 6 x 8 = 48 states, one for each pair of states in the DFAs for divisibility by 6 and 8. The transitions are defined as follows: from state (i, j), where i is a state in the DFA for divisibility by 6 and j is a state in the DFA for divisibility by 8, there is a transition labeled 'a' to state ((i+1) mod 6, j) and a transition labeled 'b' to state (i, (j+1) mod 8).
Therefore, the minimum number of states that the DFA will have is 48, which is option (d).
Consider a DFA over ∑ = {a, b} accepting all strings which have ...
We construct a DFA for strings divisible by 6. It requires minimum 6 states as length of string mod 6 = 0, 1, 2, 3, 4, 5
We construct a DFA for strings divisible by 8. It requires minimum 8 states as length of string mod 8 = 0, 1, 2, 3, 4, 5, 6, 7
If first DFA is minimum and second DFA is also minimum then after merging both DFAs resultant DFA will also be minimum. Such DFA is called as compound automata.
So, minimum states in the resultant DFA = 6 * 8 = 48
Thus, option (D) is the answer.
Please comment below if you find anything wrong in the above post.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).